<?php
class getMemberList extends ActionHandler
{
	function handleRequest($jsonData)
	{
		$data = $jsonData['params'];
		$guildId = $data['guildId'];
		$sql = "select a.userId, a.priority, b.name from ".$this->tables['guild_user_profile']." a left join ".$this->tables['user_profile']." b on a.userId = b.id where a.guildId = ".$guildId;
		$result = $this->db->query($sql);
		$return = array();
		$this->debug .= "\n".$sql."\n";
		$i = 0;
		while ($arr = $this->db->fetchArray($result))
		{
			$return[$i]['userId'] = $arr['userId'];
			$return[$i]['priority'] = $arr['priority'];
			$return[$i]['userName'] = $arr['name'];
			$i ++;
		}
		
		return $return;
	}
}
?>